package com.jt;

import com.jt.demo.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

@Configuration//标识这是配置类
@ComponentScan("com.jt")
public class SpringConfig {
    @Bean
    //@Lazy  懒加载只对加载有效
    public User user(){
        return new User();
    }
}
